package com.google.samples.apps.paging.data

import androidx.lifecycle.MutableLiveData
import androidx.paging.DataSource
import com.google.samples.apps.paging.data.bean.GoodsBean


/**
 * Created by Administrator on 2021/7/12 0012.
 * Describe:
 */
class GoodsDataSourceFactory : DataSource.Factory<Int, GoodsBean>() {
    val liveDataSource = MutableLiveData<GoodsDataSource>()

    override fun create(): DataSource<Int, GoodsBean> {
        val postDataSource = GoodsDataSource()
        liveDataSource.postValue(postDataSource)
        return postDataSource
    }
}